package com.example.demo.serve;

import com.example.demo.entity.User;
import com.example.demo.mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class Userservice {
    @Autowired
    private UserMapper userMapper;

    public List<User> findUsers() {
        return userMapper.findlist();
    }

    public void update(User user) {
        userMapper.update(user);
    }

    public void delete(String age) {

         userMapper.delete(age);
    }

    public void save(User user) {
         userMapper.save(user);
    }

    public User get(String age) {
        return userMapper.get(age);
    }
}
